<gm:page title="Digital Kitchen" authenticate="false">

  <!--
    The published version of this project can be found at http://digikitchen.googlemashups.com
  -->
  
  <script language="javascript" type="text/javascript">
    var name = prompt("Welcome. What is your name?", "");
  </script>

  <div class="gm-app-header">
    <h1>Digital Kitchen</h1>
  </div>
  
  <div>
    <script language="javascript" type="text/javascript">
      document.write("<h2>Welcome, Chef " + name + "!</h2>");
    </script>
  </div>
  
  <!-- Begin YouTube Template -->
  <gm:template id="videoTemplate">
    <table>
      <tbody border="0" width="100%" repeat="true">
        <tr>
          <td><gm:html style="font-weight: bold" ref="atom:title"/></td>
        </tr>
        <tr>
          <td><gm:video ref="atom:link[@rel='enclosure']/@href"/></td>
        </tr>
      </tbody>
    </table>
  </gm:template>
  <!-- End YouTube Template -->
    
  <!-- Begin Generic Feed Template -->
  <gm:template id="genericFeedTemplate">
    <div repeat="true">
      <gm:pager/>
      <b><gm:link ref="atom:link/@href" labelref="atom:title"/></b>
      <br/>
      <gm:toggle/><gm:html ref="atom:summary" class="gm-toggled"/>
    </div>
  </gm:template>
  <!-- End Generic Feed Template -->
  
  <!-- Begin Grocery List Template -->
  <gm:template id="groceryListTemplate">
    <table class="green-theme" style="width:200px">
      <tr repeat="true">
        <td style="padding:5px; width:160px"><gm:text ref="atom:title"/></td>
        <td style="padding:5px; width:40px"><gm:editButtons/></td>
      </tr>
      <tfoot>
        <tr>
          <td colspan="2" align="center"><gm:create label="New Item"/></td>
        </tr>
      </tfoot>
    </table>
  </gm:template>
  <!-- End Grocery List Template -->
  
  <!-- Begin Recipe of the Day Template -->
  <gm:template id="rotdTemplate">
    <div repeat="true">
      <br/>
      <b><gm:link ref="atom:link/@href" labelref="atom:title"/></b>
      <br/>
      <gm:html ref="atom:summary"/>
    </div>
  </gm:template>
  <!-- End Recipe of the Day Template -->
    
  <!-- Begin Picture Template -->
  <gm:template id="pictureTemplate">
    <div repeat="true"> 
      <gm:html ref="atom:summary"/>
    </div>
  </gm:template>
  <!-- End Picture Template -->
    
  <br/>
  
  <!-- Main Page Tabs -->
  <gm:tabs target="mainContainer"/>
  <gm:container id="mainContainer">
    
    <!-- Begin Counter Top Tab -->
    <gm:section id="counterTop" title="Counter Top">
      
      <h2>Grocery List</h2>
      <table style="width:100%">
        <tr>
          <td style="padding-right:10px;width:200px" valign="top">
            <gm:list id="myList" data="${tmp}/groceryList" template="groceryListTemplate"/>
          </td>
        </tr>
      </table>
      
      <br/>
      <br/>
      
      <h2>Recipe of the Day</h2>
      <gm:list id="localNewsList" template="rotdTemplate"
          data="http://www.bettycrocker.com/recipes/RecipeOfTheDayRSS.aspx" pagesize="1"/>
      
      <br/>
      <br/>
      
      <h2>Food for Thought</h2>
      <gm:list id="pictureList" template="pictureTemplate"
          data="http://api.flickr.com/services/feeds/groups_pool.gne?id=78103915@N00&lang=en-us&format=rss_200" pagesize="1"/>
  
    </gm:section>
    <!-- End Counter Top Tab -->
    
    <!-- Begin Cookbook Tab -->
    <gm:section id="cookbook" title="Cookbook">
      <table>
        <tr>
          <td>
            <h3>Dinner Recipes</h3>
          </td>
          <td>
          </td>
          <td>
            <h3>Entertaining Recipes</h3>
          </td>
        </tr>
        <tr>
          <td>
            <gm:list id="dinnerRecipes" template="genericFeedTemplate"
                data="http://rss.allrecipes.com/daily.aspx?hubID=80" pagesize="5"/>
          </td>
          <td>
          </td>
          <td>
            <gm:list id="entertainingRecipes" template="genericFeedTemplate"
                data="http://rss.allrecipes.com/daily.aspx?hubID=85" pagesize="5"/>
          </td>
        </tr>
      </table>
                  
      <table>
        <tr>
          <td>
            <br/>
            <h3>Baking Recipes</h3>
          </td>
          <td>
          </td>
          <td>
            <br/>
            <h3>Mixed Drink Recipes</h3>
          </td>
        </tr>
        <tr>
          <td>       
            <gm:list id="bakeRecipes" template="genericFeedTemplate"
                data="http://rss.allrecipes.com/daily.aspx?hubID=90" pagesize="5"/>  
          </td>
          <td>
          </td>
          <td>
            <gm:list id="DrinkNation" template="genericFeedTemplate"
                data="http://rss.drinknation.com/daily.xml" pagesize="5"/>
          </td>
        </tr>
      </table>     
    </gm:section>
    <!-- End Cook Book Tab -->
      
    <!-- Begin Refrigerator Tab -->
    <gm:section id="refrigerator" title="Refrigerator">
      
      <h3>Whole Foods Podcasts</h3>
      <gm:list id="podcasts" template="rotdTemplate"
          data="http://feeds.feedburner.com/WholeFoodsPodcasts?format=xml" pagesize="5"/>
      
      <br/>
      <br/>
  
      <h2>YouTube Videos</h2>
        <gm:tabs target="myContainer"/>
          <gm:container id="myContainer" style="width:600px">
            <gm:section id="section1" title="Cooking Videos">
              <h3>Cooking Videos</h3>
              <gm:list template="videoTemplate" data="http://www.youtube.com/rss/tag/cooking.rss" pagesize="5" selection="false"/>
            </gm:section>
            <gm:section id="section2" title="Recipe Videos">
              <h3>Food Recipe Videos</h3>
               <gm:list template="videoTemplate" data="http://www.youtube.com/rss/tag/foodrecipe.rss" pagesize="5" selection="false"/>
            </gm:section>
            <gm:section id="section3" title="Cooking Related">
              <table>
                <tr>
                  <td>
                    <h3>More Recipe Videos</h3>
                  </td>
                  <td>
                  </td>
                  <td>
                    <h3>Cooking Class Videos</h3>
                  </td>
                </tr>
                <tr>
                  <td>
                    <gm:list template="videoTemplate" data="http://www.youtube.com/rss/tag/cookingrecipe.rss" pagesize="5" selection="false"/>
                  </td>
                  <td>
                  </td>
                  <td>
                    <gm:list template="videoTemplate" data="http://www.youtube.com/rss/tag/cookingclass.rss" pagesize="5" selection="false"/>
                  </td>
                </tr>
              </table>
            </gm:section>
          </gm:container>
    </gm:section>
    <!-- End Refrigerator Tab -->
  </gm:container>
  
</gm:page>
